#!/usr/bin/make -f

include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

JAVA_HOME		:= /usr/lib/jvm/java-gcj
DEB_ANT_BUILD_TARGET 	:= build-dir
DEB_JARS  		:= hsqldb

IMAGE_SRCDIR  := entagged/entagged-build-resources/image
IMAGE_DESTDIR := $(DEB_DESTDIR)/usr/share/icons/hicolor

install/entagged::
	install -m 644 -D build/entagged/entagged-tageditor*.jar \
	  $(DEB_DESTDIR)/usr/share/java/entagged-tageditor-$(DEB_UPSTREAM_VERSION).jar
	dh_link /usr/share/java/entagged-tageditor-$(DEB_UPSTREAM_VERSION).jar \
	  /usr/share/java/entagged-tageditor.jar
	dh_install debian/entagged.desktop /usr/share/applications
	install -m 755 -D debian/entagged.sh $(DEB_DESTDIR)/usr/bin/entagged
	install -m 644 -D $(IMAGE_SRCDIR)/entagged-32x32.png \
	  $(IMAGE_DESTDIR)/32x32/apps/entagged.png
	install -m 644 -D $(IMAGE_SRCDIR)/entagged-128x128.png \
	  $(IMAGE_DESTDIR)/128x128/apps/entagged.png

get-orig-source:
	-uscan --upstream-version 0 --rename
